package com.metagurukul.metagranth.service;

import com.metagurukul.metagranth.exception.MetaSqlException;
import com.metagurukul.metagranth.model.dao.AnswerDAO;
import com.metagurukul.metagranth.vo.Answer;

/**
 * This class handles AnswerDAO 
 * @author Team MetaGranth 
 */

public class AnswerService {

	/**
	 * This method saves answer in the database
	 * @param Answer answer
	 * @return int status
	 * @throws MetaSqlException
	 */
	
	public static int saveAnswer(Answer answer) throws MetaSqlException {
		int status=0;
		
		// if answer is not null then AnswerDAO will be called to save answer
		if(answer!=null){
			status=AnswerDAO.saveAnswer(answer);
		}
		return status;
	}
}
